/**
 * 
 */
package com.shiplanet.service;

import java.io.File;
import java.util.List;
import java.util.Map;

import com.shiplanet.entity.Category;
import com.shiplanet.entity.Post;

/**
 * @author joesong
 *
 */
public interface CategoryService {

	public Category getCategory(Integer i);
	
	public Integer saveCategoryWithPhoto(Category category, File[] photoFiles, String realRootPath) throws Exception;
	
	public void deleteCategoryWithPhoto(Category category, String realRootPath);
	
	public void updateCategoryWithPhoto(Category originalCategory, Category newCategory, File[] photoFiles, String realRootPath) throws Exception;
	
	public List<Category> findRootCategories();
	
	public List<Category> findPopularCategories();
	
	public List<Post> findPostsByCategory(Category category);
	
	public List<Post> findPostsByCategoryAndKeyword(Category category, String keyword);
	
	public Map<Integer, String> getCategoryNameMap(boolean isFullName, boolean isRootLevel);

}
